-
Notifications
You must be signed in to change notification settings - Fork 31
PBD + MPM examples #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add PBD cloth simulation (12_pbd_cloth) - Add PBD mesh simulation (13_pbd_mesh) - Add PBF fluids simulation (14_pbf) - Add viscoplastic MPM material model (11_mpm_plastic) - Rename substep function to p2g2p in viscoplastic simulator
|
When I try to run the pbf example, I got I guess this might be a python version issue. Which python are you using? |
|
Hi Minchen, sorry, I should have specified the version! Just created a new environment with (test_pb) ➜ zzigak @ mbp ~/test_pb uv pip list git:(main)
Package Version
-------------- -------
colorama 0.4.6
dill 0.4.0
markdown-it-py 4.0.0
mdurl 0.1.2
numpy 2.2.6
pygments 2.19.2
rich 14.2.0
taichi 1.7.4I think the crash occurs because Taichi v1.7.2 fails to recognize the NumPy array as a data container (runtime argument), incorrectly treating it as a template argument that requires hashing For visualization i recommend putting the window into full screen for proper rendering of particles. Please do tell if this works for you! |
|
The same version works for pbd_cloth (need to add warp-lang) example and viscoplastic mpm example too. For pbd_cloth you need to enable animation first before moving the control point, but it should be a simple fix to only allow that button to work when animation is enabled. |
|
No worries! Updating taichi to 1.7.4 works! It would be great to specify the required versions in the readme. All examples are super cool! I really enjoyed playing with them. Do you think it would be better to separate each PBD implementation example to multiple files so that the code is easier to read? |
|
Thanks, glad it worked! Yes, we could split each implementation. What granularity did you have in mind? We could maybe have one file for the constraints and one for the solver? Or one file for each constraint? |
|
I think one for each constraint, one for the simulator, and one for the solver for a single time step would be great, just like the mass-spring and IPC examples. What do you think? |
|
Yes, I had that in mind, sounds good! I can try to do that this week. |
|
Sounds great, no rush! |
Added the following examples: